/**
* project3D Engine
* @author John Sword
* @version 2 - AS3
*/

package engine.geom
{

	import engine.objects.Object3D;

	public class Vertex
	{
		
		public var x:Number;
		public var y:Number;
		public var z:Number;
		public var visible :Boolean = true;
		public var screen :Vector;
		public var o:Object3D;

		/**
		* Create a new Vertex
		* 
		* @param x the x coordinate
		* @param y the y coordinate
		* @param z the z coordinate
		*/ 	
		public function Vertex ( x:Number = 0, y:Number = 0, z:Number = 0 )
		{
			this.x = x || 0;
			this.y = y || 0;
			this.z = z || 0;
			screen = new Vector();
		}
		
		public function clone () : Vertex
		{
			var v:Vertex = new Vertex();
			v.x = x;
			v.y = y;
			v.z = z;
			v.visible 	= this.visible;
			v.screen.x 	= this.screen.x;
			v.screen.y 	= this.screen.y;
			v.screen.z 	= this.screen.z;
			v.o = this.o;
			return v;
		}
		
		public function toString () : String
		{
			return "x: " + x + " y: " + y + " z:" + z;
		}
		
	}

}